package cn.zlj.pethome.org.mapper;

import cn.zlj.pethome.org.domain.TEmployee;
import cn.zlj.pethome.org.query.QueryPage;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface EmployeeMapper {
    @Select("select * from t_employee")
    List<TEmployee> getList();

    @Select("select * from t_employee where id=#{id}")
    TEmployee getOne(Long id);

    @Select("select * from t_employee where username=#{username}")
    TEmployee getName(String username);
    //@Select("select * from t_employee limit #{pageStart},#{pageSize} ")
    List<TEmployee> queryPage(QueryPage page);

    //@Select("select count(*) from t_employee")
    Integer queryPageCount(QueryPage page);

    @Delete("delete from t_employee where id=#{id} ")
    void del(Long id);

    void batchDel(List<Long> ids);
    void update(TEmployee tEmployee);

     void save(TEmployee tEmployee);

    TEmployee selectByLogininfoId(Long id);

    List<TEmployee> selectByShopId(Long shopId);

}
